<?php
/** 
 * Author: Shadow Themes
 * Author URL: http://shadow-themes.com
 */

if ( ! defined( 'ABSPATH' ) ) exit;

if ( ! function_exists( 'ashade_woo__widget_rating' ) ) {
	function ashade_woo__widget_rating( $rating = false) {
		if ( $rating ) {
			$setWidth = ($rating*100)/5;
			?>
			<div class="ashade-widget-rating ashade-widget-rating--small">
				<svg xmlns="http://www.w3.org/2000/svg" width="68.523" height="11.922" viewBox="0 0 68.523 11.922">
					<path d="M13.262-6.754,9.953-3.773,10.883.6,7-1.613,3.117.6l.93-4.375L.738-6.754l4.43-.465L7-11.32l1.832,4.1Zm14,0-3.309,2.98L24.883.6,21-1.613,17.117.6l.93-4.375-3.309-2.98,4.43-.465L21-11.32l1.832,4.1Zm14,0-3.309,2.98L38.883.6,35-1.613,31.117.6l.93-4.375-3.309-2.98,4.43-.465L35-11.32l1.832,4.1Zm14,0-3.309,2.98L52.883.6,49-1.613,45.117.6l.93-4.375-3.309-2.98,4.43-.465L49-11.32l1.832,4.1Zm14,0-3.309,2.98L66.883.6,63-1.613,59.117.6l.93-4.375-3.309-2.98,4.43-.465L63-11.32l1.832,4.1Z" transform="translate(-0.738 11.32)" fill="none" stroke="#808080" stroke-width="1"/>
				</svg>
				<span style="width: <?php echo esc_attr( $setWidth ); ?>%">
					<svg xmlns="http://www.w3.org/2000/svg" width="68.523" height="11.922" viewBox="0 0 68.523 11.922">
						<path d="M13.262-6.754,9.953-3.773,10.883.6,7-1.613,3.117.6l.93-4.375L.738-6.754l4.43-.465L7-11.32l1.832,4.1Zm14,0-3.309,2.98L24.883.6,21-1.613,17.117.6l.93-4.375-3.309-2.98,4.43-.465L21-11.32l1.832,4.1Zm14,0-3.309,2.98L38.883.6,35-1.613,31.117.6l.93-4.375-3.309-2.98,4.43-.465L35-11.32l1.832,4.1Zm14,0-3.309,2.98L52.883.6,49-1.613,45.117.6l.93-4.375-3.309-2.98,4.43-.465L49-11.32l1.832,4.1Zm14,0-3.309,2.98L66.883.6,63-1.613,59.117.6l.93-4.375-3.309-2.98,4.43-.465L63-11.32l1.832,4.1Z" transform="translate(-0.738 11.32)" fill="#808080"/>
					</svg>
				</span>
			</div><!-- .ashade-widget-rating -->
			<?php
		}
	}
}